/**
  ******************************************************************************
  * @file 
  * @brief 
  * @author taoye
  * @version V1.0.0
  * @date 2021/01/01
  ******************************************************************************
  */
#ifndef _COMMON_F4_H
#define _COMMON_F4_H 

#include "standard_include.h"
#include "stm32f4xx.h"
#include "stm32f4xx_gpio.h"
#include "stm32f4xx_rcc.h"
#include "stm32f4xx_usart.h"
#include "stm32f4xx_dma.h"
/* Public defines -----------------------------------------------------------*/
#define GetBit(x,y) ((x) >> (y)&1)	//获取将x的第y位（0或1）
#define SetBit(x,y) x|=(1<<y) 		//将X的第Y位置1
#define ClrBit(x,y) x&=~(1<<y) 		//将X的第Y位清0


/* Public Struct  -----------------------------------------------------------*/


/* Public enum    -----------------------------------------------------------*/


/* Public Variable  ---------------------------------------------------------*/
//Pointer

//Array

//Const



/* Pubilc function prototypes -----------------------------------------------*/
int Common_CheckGpio(const char *gpio_name, GPIO_TypeDef **port, uint16_t *pin, uint32_t *portrcc, uint8_t *source);
int Common_Gpio_AFConfig(const char *gpio_name, uint8_t GPIO_AF, GPIOPuPd_TypeDef pupd);
void SoftDelay_us(uint32_t us);
void SoftDelay_ms(uint32_t ms);
	
#endif

